package com.freemypay.test.并发.Executor;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.freemypay.test.并发.定义任务.LiftOff;

public class CachedThreadPool {
	public static void main(String[] args) {
		ExecutorService exec = Executors.newCachedThreadPool();
		for (int i = 0; i < 5; i++) {
			exec.execute(new LiftOff(10));
		}
		exec.shutdown(); 
	}

}
